
export default (options) => {
  // default options
  const defaultOption = {
    mode: 0,
    openHls: false,
    autoPlay: true,
    sendTime: 10
  }

  for (const defaultKey in defaultOption) {
    if ({}.hasOwnProperty.call(defaultOption, defaultKey) && !{}.hasOwnProperty.call(options, defaultKey)) {
      // eslint-disable-next-line no-param-reassign
      options[defaultKey] = defaultOption[defaultKey]
    }
  }
  return options
}
